<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>option 的默认配置 | VueDialog</title>
    <meta name="generator" content="VuePress 1.8.2">
    
    <meta name="description" content="函数式vue弹框组件">
    
    <link rel="preload" href="/assets/css/0.styles.cc89e670.css" as="style"><link rel="preload" href="/assets/js/app.788a47ea.js" as="script"><link rel="preload" href="/assets/js/2.7e7556ec.js" as="script"><link rel="preload" href="/assets/js/14.1e4ace2f.js" as="script"><link rel="prefetch" href="/assets/js/10.b84ad5d4.js"><link rel="prefetch" href="/assets/js/11.fc2c4f3c.js"><link rel="prefetch" href="/assets/js/12.9c54e5b5.js"><link rel="prefetch" href="/assets/js/13.ac599485.js"><link rel="prefetch" href="/assets/js/15.39a933fd.js"><link rel="prefetch" href="/assets/js/3.c3e77ff5.js"><link rel="prefetch" href="/assets/js/4.23df146b.js"><link rel="prefetch" href="/assets/js/5.8e9108c5.js"><link rel="prefetch" href="/assets/js/6.16373f7f.js"><link rel="prefetch" href="/assets/js/7.fd48b8cc.js"><link rel="prefetch" href="/assets/js/8.bb0177c6.js"><link rel="prefetch" href="/assets/js/9.c3c48dac.js">
    <link rel="stylesheet" href="/assets/css/0.styles.cc89e670.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/assets/logo.png" alt="VueDialog" class="logo"> <span class="site-name can-hide">VueDialog</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/zh/guide/example/" class="nav-link">
  快速开始
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  API
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  在线Demo
</a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/zh/guide/example/" class="nav-link">
  快速开始
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  API
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  在线Demo
</a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>指南</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/start/" aria-current="page" class="sidebar-link">快速开始</a></li><li><a href="/zh/guide/start/option.html" class="sidebar-link">option配置</a></li><li><a href="/zh/guide/start/defaultOption.html" aria-current="page" class="active sidebar-link">option默认值</a></li></ul></section></li><li><a href="/zh/guide/api/" class="sidebar-link">API</a></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>示例</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/example/" class="sidebar-link">代码示例</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>联系我们</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/our/" class="sidebar-link">联系我们</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="option-的默认配置"><a href="#option-的默认配置" class="header-anchor">#</a> option 的默认配置</h1> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token comment">//对话框配置</span>
<span class="token comment">//默认选项</span>
<span class="token comment">//类型传递</span>
<span class="token comment">//（支持vue组件、html代码片段、dom元素）</span>
<span class="token comment">// Class dialogCom  {</span>
<span class="token comment">//   type:vue、html、dom、</span>
<span class="token comment">//   subCom:{}</span>
<span class="token comment">//   subData：{}</span>
<span class="token comment">// }</span>
<span class="token keyword">var</span> defaultOption <span class="token operator">=</span> <span class="token punctuation">{</span>
  hasHead<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">//是否拥有头部(完成)</span>
  customHead<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//自定义头部内容,见Class dialogCom ，hasHead为true生效(完成)</span>
  title<span class="token operator">:</span> <span class="token string">&quot;标题&quot;</span><span class="token punctuation">,</span> <span class="token comment">//标题(完成)</span>
  hasMin<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">//是否有最小化按钮(完成)</span>
  hasMax<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">//是否有最大化按钮(完成)</span>
  content<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//弹框内容,见Class dialogCom (完成)</span>
  move<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">//是否可以拖动(完成)</span>
  shade<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">//是否有遮罩(完成)</span>
  blank<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">//是否在点击空白处自动关闭弹框，仅在shade为true时有效(完成)</span>
  minWidth<span class="token operator">:</span> <span class="token number">300</span><span class="token punctuation">,</span> <span class="token comment">//最小化宽度(完成)</span>
  minHight<span class="token operator">:</span> <span class="token number">40</span><span class="token punctuation">,</span> <span class="token comment">//最小化高度(完成)</span>
  bottomOff<span class="token operator">:</span> <span class="token number">30</span><span class="token punctuation">,</span> <span class="token comment">//最小化后距离窗口底部距离(完成)</span>
  leftOff<span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token comment">//最小化后距离窗口左边距离(完成)</span>
  rowGap<span class="token operator">:</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token comment">//行间距(完成)</span>
  colGap<span class="token operator">:</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token comment">//列间距(完成)</span>
  location<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">//弹框位置，可由对象指定,为空则默认居中显示(完成)</span>
    top<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span>
    left<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span>
    bottom<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span>
    right<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  area<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">//弹框大小(完成)</span>
    height<span class="token operator">:</span> <span class="token string">&quot;auto&quot;</span><span class="token punctuation">,</span>
    width<span class="token operator">:</span> <span class="token string">&quot;auto&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  multiple<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">//是否为多弹框模式(完成)</span>
  theme<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//自定义皮肤,目前内置皮肤theme-lan、theme-lv(完成)</span>
  <span class="token comment">//回调开始</span>
  success<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//弹出成功后回调,type: Function(完成)</span>
  cancel<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//弹框关闭回调,type: Function(完成)</span>
  minBack<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//最小化回调,type: Function(完成)</span>
  maxBack<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//最大化回调,type: Function(完成)</span>
  restore<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//复原后回调,type: Function(完成)</span>
  mixin<span class="token operator">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span> <span class="token comment">//混淆，用于完全个性化制定(完成)</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/zh/guide/start/option.html" class="prev">
        option配置
      </a></span> <span class="next"><a href="/zh/guide/api/">
        API
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.788a47ea.js" defer></script><script src="/assets/js/2.7e7556ec.js" defer></script><script src="/assets/js/14.1e4ace2f.js" defer></script>
  </body>
</html>
